package com.zls.commonutil.component;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;

import com.zls.commonutil.Lg;

/**
 * Created by oop on 2018/4/4.
 */

public class BaseActivity extends Activity {

    protected String tag = this.getClass().getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Lg.i(tag, "onCreate");
        BaseApp.getINSTANCE().save(this);
    }

    @Override
    protected void onStart() {
        super.onStart();
        Lg.i(tag, "onStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Lg.i(tag, "onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Lg.i(tag, "onPause");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Lg.i(tag, "onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        BaseApp.getINSTANCE().remove(this);
        Lg.i(tag, "onDestroy");
    }
}
